/*
 * Copyright © 2022-now 尛飛俠（Denvie） All rights reserved.
 */

package cn.denvie.springcloud.seata.order.feign;

import cn.denvie.springcloud.seata.common.model.vo.ResultVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * AccountFeignService。
 *
 * @author Denvie
 * @date 2022/4/8
 * @since 1.0.0
 */
@FeignClient(name = "account-service", path = "/account")
public interface AccountFeignService {
    /**
     * 扣减账户余额。
     *
     * @param userId 用户ID
     * @param money  金额
     * @return ResultVo
     */
    @RequestMapping("/debit")
    ResultVo<Void> debit(@RequestParam("userId") String userId, @RequestParam("money") int money);
}
